package com.create404.suishoupai.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.create404.suishoupai.dto.CommentedAnnouncementDto;
import com.create404.suishoupai.entity.AnnouncementComment;
import com.create404.suishoupai.mapper.AnnouncementCommentMapper;
import com.create404.suishoupai.service.IAnnouncementCommentService;
import com.create404.suishoupai.vo.AnnouncementCommentListItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Service
public class AnnouncementCommentServiceImpl extends ServiceImpl<AnnouncementCommentMapper, AnnouncementComment> implements IAnnouncementCommentService {

    @Override
    public List<AnnouncementCommentListItemVO> getAnnouncementCommentList(String announcementId) {
        return this.baseMapper.getAnnouncementCommentList(announcementId);
    }

    @Autowired
    AnnouncementCommentMapper announcementCommentMapper;

    @Override
    public IPage<CommentedAnnouncementDto> getCommentedAnnouncement(Page<?> page, String employeeId) {
        return announcementCommentMapper.getCommentedAnnouncement(page, employeeId);
    }
}
